//
//  ThemeManager.m
//  XYAuto
//
//  Created by Raymond on 2016/12/23.
//  Copyright © 2016年 Raymond~. All rights reserved.
//

#import "ThemeManager.h"
#import <UIButton+WebCache.h>

@implementation ThemeManager
+ (void)setSetting{
    
    UIImage *image = [UIImage imageWithColor:[UIColor blackColor] size:CGSizeMake(ScreenWidth, 10)];
    [[UINavigationBar appearance] setBackgroundImage:[image stretchableImageWithLeftCapWidth:0 topCapHeight:0] forBarMetrics:UIBarMetricsDefault];
    [[UINavigationBar appearance] setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:[UIColor whiteColor],NSForegroundColorAttributeName,nil]];
    [[UINavigationBar appearance] setTintColor:[UIColor whiteColor]];
//    [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];
    
//    [UINavigationBar appearance].barStyle = UIBarStyleBlack;
//    [UINavigationBar appearance].translucent = YES;
    [[UIBarButtonItem appearance] setTitleTextAttributes:@{NSFontAttributeName:[UIFont systemFontOfSize:15],NSForegroundColorAttributeName:[UIColor whiteColor]} forState:UIControlStateNormal];
    [[UITabBarItem appearance] setTitleTextAttributes:@{NSFontAttributeName:[UIFont boldSystemFontOfSize:10]} forState:UIControlStateNormal];
    
    
    [UITableView appearance].estimatedRowHeight = 0;
    [UITableView appearance].estimatedSectionHeaderHeight = 0;
    [UITableView appearance].estimatedSectionFooterHeight = 0;
    
    
    if (IS_IOS_11) {
        [UIScrollView appearance].contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
    }
}


@end
